<?php

namespace app\common\model;

use app\admin\model\classes\Classes;
use think\Db;
use think\Model;

/**
 * 会员模型
 */
class ClassesCourseTable extends Model
{

    protected $pk = 'id';
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';


    public function info()
    {
        return $this->hasMany(ClassesCourseInfo::class, 'course_id', 'id');
    }

    public function classes()
    {
        return $this->belongsTo(Classes::class, 'classes_id', 'id');
    }

}
